<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>招标列表</title>
    <!--css style-->
    <link rel="stylesheet" href="css/base.css">
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="css/font.css">
    <link rel="stylesheet" href="responsive/flexible.css">
    <script src="responsive/flexible.js"></script>
</head>
<body class="inner_page tender_list">
    <header>
        <a href="javascript:void(0)" class="pre_page"></a>
        <a href="index.html" class="home"></a>
        招标列表


    </header>


    <section class="main">

        <div class="tenders_list">
            <ul class="container">
                <li>
                    <div class="pic"><a href="javascript:void(0);"><img src="img/tender.jpg" alt=""></a></div>
                    <div class="desc">
                        <h2><a href="javascript:void(0);">保利管道上海总经销、各类卫浴厨 具龙头开关</a></h2>
                        <p class="type"><i>建材</i>江苏省  上海市</p>
                        <a href="javascript:void(0);" class="to_bid">我要竞标</a>
                    </div>

                </li>
                <li>
                    <div class="pic"><a href="javascript:void(0);"><img src="img/tender.jpg" alt=""></a></div>
                    <div class="desc">
                        <h2><a href="javascript:void(0);">保利管道上海总经销、各类卫浴厨 具龙头开关</a></h2>
                        <p class="type"><i>建材</i>江苏省  上海市</p>
                        <a href="javascript:void(0);" class="to_bid">我要竞标</a>
                    </div>

                </li>
                <li>
                    <div class="pic"><a href="javascript:void(0);"><img src="img/tender.jpg" alt=""></a></div>
                    <div class="desc">
                        <h2><a href="javascript:void(0);">保利管道上海总经销、各类卫浴厨 具龙头开关</a></h2>
                        <p class="type"><i>建材</i>江苏省  上海市</p>
                        <a href="javascript:void(0);" class="to_bid">我要竞标</a>
                    </div>

                </li>
                <li>
                    <div class="pic"><a href="javascript:void(0);"><img src="img/tender.jpg" alt=""></a></div>
                    <div class="desc">
                        <h2><a href="javascript:void(0);">保利管道上海总经销、各类卫浴厨 具龙头开关</a></h2>
                        <p class="type"><i>建材</i>江苏省  上海市</p>
                        <a href="javascript:void(0);" class="to_bid">我要竞标</a>
                    </div>

                </li>
                <li>
                    <div class="pic"><a href="javascript:void(0);"><img src="img/tender.jpg" alt=""></a></div>
                    <div class="desc">
                        <h2><a href="javascript:void(0);">保利管道上海总经销、各类卫浴厨 具龙头开关</a></h2>
                        <p class="type"><i>建材</i>江苏省  上海市</p>
                        <a href="javascript:void(0);" class="to_bid">我要竞标</a>
                    </div>

                </li>
                <li>
                    <div class="pic"><a href="javascript:void(0);"><img src="img/tender.jpg" alt=""></a></div>
                    <div class="desc">
                        <h2><a href="javascript:void(0);">保利管道上海总经销、各类卫浴厨 具龙头开关</a></h2>
                        <p class="type"><i>建材</i>江苏省  上海市</p>
                        <a href="javascript:void(0);" class="to_bid">我要竞标</a>
                    </div>

                </li>
                <li>
                    <div class="pic"><a href="javascript:void(0);"><img src="img/tender.jpg" alt=""></a></div>
                    <div class="desc">
                        <h2><a href="javascript:void(0);">保利管道上海总经销、各类卫浴厨 具龙头开关</a></h2>
                        <p class="type"><i>建材</i>江苏省  上海市</p>
                        <a href="javascript:void(0);" class="to_bid">我要竞标</a>
                    </div>

                </li>
                <div class="clear"></div>
            </ul>

        </div>


    </section>

    <div class="fix_nav">
        <div class="wrapper">
            <ul class="container">
                <li>
                    <a href="javascript:void(0)" class="home active">
                        首页
                    </a>
                </li>
                <li>
                    <a href="javascript:void(0)" class="class">
                        分类
                    </a>
                </li>
                <li>
                    <a href="javascript:void(0)" class="activity_center">
                        活动中心
                    </a>
                </li>
                <li>
                    <a href="javascript:void(0)" class="cart">
                        购物车
                    </a>
                </li>
                <li>
                    <a href="javascript:void(0)" class="mine">
                        我的
                    </a>
                </li>
            </ul>

        </div>

    </div>

</body>
<script src="js/jquery.js"></script>
<script>
    $(function(){
        console.log( $(":input"));
        $(":input").change(function(){
            var $this=$(this);
            var $label=$this.next();
            var $parent=$(this).parents("dd");
            var $span=$parent.prev().find("span");
            if($this.is(":checked")){
                console.log($label);
                if($span.html()=="全部"){
                    $span.addClass("red");
                    $span.selected=true;
                    $span.html($label.html());
                }else{
                    console.log("111");
                    $span.html( $span.html()+","+$label.html());

                }

            }else{
                if($parent.find(":checked").length==0){
                    $span.html("全部");
                    $span.removeClass("red");
                    return;
                }else{
                    $span.html("");
                    var str="";
                    $parent.find(":checked").each(function(index){
                        console.log($(this).next().html());
                        str+=","+$(this).next().html();

                    });

                    $span.html(str.substr(1));
                }

            }
        });
    });
</script>
</html>